<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
    <meta name="author" content="Coderthemes">
	
	<!-- jQuery  -->
    <script type="text/javascript" src="/static/plugins/jquery/jquery-3.6.0.min.js"></script>
	
	<!-- layui  -->
	<link rel="stylesheet" href="/static/plugins/layui/2.7.6/css/layui.css" media="all" />
	<script src="/static/plugins/layui/2.7.6/layui.js" charset="utf-8"></script>
	
	<link rel="stylesheet" href="/static/admin/css/mini-ease-edit.css">
	
	<!-- ysui-->
	<link rel="stylesheet" href="/static/plugins/ysui/1.0.0/css/ysui.css" media="all">
</head>
<body>

	<form class="layui-form" id="formId" method="post" action="/api/inter/ysMenu/setting">
		
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
			<legend>前台页面的相关设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">菜单ID：</label>
					<div class="layui-input-block">
						<input type="text" name="id" th:value="${dto.id}" class="layui-input cannot-edit" readonly >
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">菜单名称：</label>
					<div class="layui-input-block">
						<input type="text" name="name" th:value="${dto.name}" class="layui-input cannot-edit" readonly >
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item" style="margin-bottom: 10px;">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">权限名称：</label>
					<div class="layui-input-block">
						<input type="text" name="nameShiroAuth" th:value="${dto.nameShiroAuth}" class="layui-input" autocomplete="off" lay-verify="required" >
						<span>若不设置，则任意填写，如：#</span>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item" style="margin-bottom: 10px;">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">前台模板类型：</label>
					<div class="layui-input-block">
						<select name="templetType">
							<option th:each="templetType: ${dto.templetTypeArr}" th:value="${templetType.value}" th:text="${templetType.name}" th:selected="${templetType.selected}"></option>
						</select>
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">自定义地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathSelfDefine" th:value="${dto.pathSelfDefine}" autocomplete="off" placeholder="请输入"  class="layui-input" >
						<span>前台模板类型为自定义时才填写</span>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>前台请求地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathGridRequest" th:value="${dto.pathGridRequest}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>此处为表格上数据的请求路径，如：/api/inter/xxxxxxxxx/search</span>
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>前台编辑地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathGridEditRequest" th:value="${dto.pathGridEditRequest}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>导出请求地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathGridExportRequest" th:value="${dto.pathGridExportRequest}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>此处为表格上数据的导出路径，如：/api/inter/xxxxxxxxx/export</span>
					</div>
				</div>
			</div>
		</div>
		
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
			<legend>表单页面的相关设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>表单新增提交地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathCommitAdd" th:value="${dto.pathCommitAdd}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>表单编辑提交地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathCommitEdit" th:value="${dto.pathCommitEdit}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>表单删除提交地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathCommitDelete" th:value="${dto.pathCommitDelete}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
		</div>
		
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
			<legend>单号相关设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">单号头：</label>
					<div class="layui-input-block">
						<input type="text" name="preCode" th:value="${dto.preCode}" autocomplete="off" placeholder="请输入"  class="layui-input" >
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">连接符：</label>
					<div class="layui-input-block">
						<input type="text" name="connectCode" th:value="${dto.connectCode}" autocomplete="off" placeholder="请输入"  class="layui-input" >
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>单号起始值：</label>
					<div class="layui-input-block">
						<input type="number" name="startNo" th:value="${dto.startNo}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required" >
						<span>若不需要，则填写0</span>
					</div>
				</div>
			</div>
		</div>
		
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
			<legend>流程的相关设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">流程模型：</label>
					<div class="layui-input-block">
						<select name="flowModelId">
							<option th:each="flowModel: ${dto.flowModelArr}" th:value="${flowModel.value}" th:text="${flowModel.name}" th:selected="${flowModel.selected}"></option>
						</select>
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>审批流转地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathFlowPass" th:value="${dto.pathFlowPass}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label"><font class="f_red">*</font>审批驳回地址：</label>
					<div class="layui-input-block">
						<input type="text" name="pathFlowRefuse" th:value="${dto.pathFlowRefuse}" autocomplete="off" placeholder="请输入"  class="layui-input" lay-verify="required"  >
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
		</div>
		
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
			<legend>子列表的相关设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r_0">
				<div>
					<label class="layui-form-label">子列表：</label>
					<div class="layui-input-block">
						<select name="gridId">
							<option th:each="grid: ${dto.gridArr}" th:value="${grid.value}" th:text="${grid.name}" th:selected="${grid.selected}"></option>
						</select>
					</div>
				</div>
			</div>
		</div>

		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"></fieldset>
		<div class="layui-form-item">
			<div class="layui-col-md1 layui-col-md-offset11">
				<div class="layui-btn-container">
					<button type="button" class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
				</div>
			</div>
		</div>
	</form>
	<script>
	$(function () {
		layui.use(['form'], function(){
			var form = layui.form;
			
			// 表单提交，共用同一个
			form.on('submit(formSubmit)', function(data){
				var indexOfLoading = layer.load(1, {
					shade: [0.5,'#000000'] //0.1透明度的白色背景
				});
				$.post(data.form.action, data.field, function(res){
					if (res.code == 0) {
						layer.msg(res.msg);
						setTimeout(function(){
							window.parent.location.reload();
						}, 1000);
					} else {
						layer.close(indexOfLoading);
						layer.msg(res.msg);
					}
				});
				return false;
			});
		});
	});
	</script>

</body>
</html>
